package com.pzb.wechat.service.impl;

import java.util.List;
import com.pzb.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pzb.wechat.mapper.WechatIntegralChangeMapper;
import com.pzb.wechat.domain.WechatIntegralChange;
import com.pzb.wechat.service.IWechatIntegralChangeService;

/**
 * 积分变更Service业务层处理
 * 
 * @author Mr_Wu
 * @date 2022-02-08
 */
@Service
public class WechatIntegralChangeServiceImpl implements IWechatIntegralChangeService 
{
    @Autowired
    private WechatIntegralChangeMapper wechatIntegralChangeMapper;

    /**
     * 查询积分变更列表
     * 
     * @param wechatIntegralChange 积分变更
     * @return 积分变更
     */
    @Override
    public List<WechatIntegralChange> selectWechatIntegralChangeList(String extAppid,String openid)
    {
        return wechatIntegralChangeMapper.selectWechatIntegralChangeList(extAppid,openid);
    }

    /**
     * 新增积分变更
     * 
     * @param wechatIntegralChange 积分变更
     * @return 结果
     */
    @Override
    public int insertWechatIntegralChange(WechatIntegralChange wechatIntegralChange)
    {
        wechatIntegralChange.setCreateTime(DateUtils.getNowDate());
        return wechatIntegralChangeMapper.insertWechatIntegralChange(wechatIntegralChange);
    }

}
